

public class NurseryEntity {
	private static final String APPEND_STR= ",  \n";
	///
	/// Attributes
	///
	private String parents = "";
	private String has_nurs = "";
	private String form = "";
	private String children = "";
	private String housing = "";
	private String finance = "";
	private String social = "";
	private String health = "";
	private String classification = "";
	
	public String getParents() {
		return parents;
	}
	public void setParents(String parents) {
		this.parents = parents;
	}
	public String getHas_nurs() {
		return has_nurs;
	}
	public void setHas_nurs(String has_nurs) {
		this.has_nurs = has_nurs;
	}
	public String getForm() {
		return form;
	}
	public void setForm(String form) {
		this.form = form;
	}
	public String getChildren() {
		return children;
	}
	public void setChildren(String children) {
		this.children = children;
	}
	public String getHousing() {
		return housing;
	}
	public void setHousing(String housing) {
		this.housing = housing;
	}
	public String getFinance() {
		return finance;
	}
	public void setFinance(String finance) {
		this.finance = finance;
	}
	public String getSocial() {
		return social;
	}
	public void setSocial(String social) {
		this.social = social;
	}
	public String getHealth() {
		return health;
	}
	public void setHealth(String health) {
		this.health = health;
	}
	public String getClassification() {
		return classification;
	}
	public void setClassification(String classification) {
		this.classification = classification;
	}
	
	public boolean isValid(){
		return !this.parents.equals("")
			&& !this.has_nurs.equals("")
			&& !this.form.equals("")
			&& !this.children.equals("")
			&& !this.housing.equals("")
			&& !this.finance.equals("")
			&& !this.social.equals("")
			&& !this.health.equals("")
			&& !this.classification.equals("");
	}
	
	@Override
	public boolean equals(Object obj) {
		if(obj instanceof NurseryEntity) {
			NurseryEntity dto = (NurseryEntity)obj;
			
			return this.parents.equals(dto.getParents())
					&& this.has_nurs.equals(dto.getHas_nurs())
					&& this.form.equals(dto.getForm())
					&& this.children.equals(dto.getChildren())
					&& this.housing.equals(dto.getHousing())
					&& this.finance.equals(dto.getFinance())
					&& this.social.equals(dto.getSocial())
					&& this.health.equals(dto.getHas_nurs())
					&&  this.classification.equals(dto.getClassification());

		}
			
		return false;
	}
	@Override
	public String toString(){ 
		return parents + APPEND_STR 
				+ has_nurs + APPEND_STR 
				+ form + APPEND_STR 
				+ children + APPEND_STR 
				+ housing + APPEND_STR 
				+ finance + APPEND_STR 
				+ social + APPEND_STR 
				+ health + APPEND_STR 
				+ classification + "\n";
		
	}
	
}
